package cn.bugDance.domain.credit.event;

import cn.bugDance.domain.credit.model.valobj.CreditPayVO;
import cn.bugDance.types.response.BaseEvent;
import org.apache.commons.lang3.RandomStringUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import java.util.Date;


public class CreditPaySuccessEvent extends BaseEvent<CreditPayVO> {

    public static final String topic = "creditPayTopic";

    public static CreditPaySuccessEvent create(CreditPayVO creditPay){
        CreditPaySuccessEvent event = new CreditPaySuccessEvent();
        event.setData(creditPay);
        event.setTimestamp(new Date());
        event.setId(RandomStringUtils.randomNumeric(12));
        return event;
    }



}
